The present invention relates generally to automatic termination of buses to enhance data transmission quality, and more particularly to a method and apparatus for terminating a bus at a device interface.
Today's standard computer architectures call for a number of separate components, such as a central processing unit ("CPU"), memory, ports and peripheral devices to be coupled together by electrical buses to provide a pathway for data between the various components. Electrical buses are simply groups of conductors (or lines) designed to operate as a group.
Components transmit data over buses by changing voltages on the various lines of the bus. In binary digital computers, each line in a bus is capable of assuming one of two possible states at a given moment. These states are represented by presence or absence of a voltage, or potential difference relative to ground, on each of the lines.
In the real world, buses are real electrical conductors and therefore contain impedance just as do all real conductors. This impedance traps electrical charge within the line, presenting, in a sense, a momentum against which the change must take place. When the line is directed to change from a binary one to a binary zero (meaning a grounding of the line), it resists the change, typically causing a voltage oscillation at the point of transition (termed "ringing"). This ringing may be of sufficient magnitude as to cause components reading data from the bus to misread the oscillation as the presence of a voltage (a binary one) instead of the intended binary zero, thereby corrupting the flow of data. Therefore, in such conductors, it is standard practice to provide a means by which to dissipate the electrical charge quickly and to damp the ringing, so as to restore data transmission fidelity. Damping is achieved through use of a terminator, which can include a plurality of resistive elements or active switches.
Some buses require terminators at each end of the bus to provide effective damping. One such bus is the small computer systems interface ("SCSI") bus. The SCSI bus is designed to operate in conjunction with microcomputers (also termed personal computers or "PCs") to provide an interface to SCSI standard peripheral devices. SCSI buses require a device interface card or controller card to manage communication of data between the PC and the SCSI devices and between the SCSI devices themselves. In PCs, this device interface card is typically placed in a slot within the main chassis of the PC.
The device interface card contains a controller that manages the SCSI bus and at least one SCSI port allowing SCSI devices to couple to the card. SCSI devices are daisy chained together with a common cable. All SCSI devices operate on common signals, and both ends of the cable are terminated with hardware terminators. The terminators, that can be connected to either SCSI devices or to the SCSI cable itself, as stated above, are required to make data transfers on the SCSI bus reliable.
Devices connected to SCSI chains must have the correct number of terminators for proper operation and to prevent damage to the device interface card. In systems that utilize SCSI devices, there can be no more than two terminators in a chain of SCSI devices, one at each end of the physical chain. This means that, if more than two SCSI devices are connected in a SCSI daisy chain, the middle device(s) on the cable must not have terminators coupled to the SCSI bus.
Some device interfaces provide two SCSI ports. One port (the "external port") is fitted on a mounting bracket attached to the card, thereby exposing it outside the main chassis when the card is mounted therein. This arrangement allows SCSI devices external to the main chassis to couple to the device interface card via the external port. Another port (the "internal port") is mounted to the device interface card such that it is exposed in the interior of the main chassis, allowing SCSI devices to be physically mounted within the main chassis and coupled to the internal port.
Since the SCSI bus must be terminated at each end, if both the internal and external ports of the device interface are coupled to SCSI devices, then the device interface does not terminate the bus because the device interface is located in the middle of the bus. However, the devices at the ends of the bus would be required to terminate their respective ends of the bus in order to maintain proper termination of the bus. On the other hand, if a SCSI device is coupled to either one (but not the other) of the ports, then the device interface terminates the bus at the device interface because the device interface is located at one end of the bus. The SCSI device at the other end of the bus would be required to terminate its respective end of the bus in order to maintain proper termination of the bus.
Properly terminating the SCSI bus is even further complicated due to the fact that both narrow and wide SCSI bus widths exists and customers desire device interface cards that can simultaneously accommodate both SCSI bus widths. One way to address this desire is to add an additional port to the device interface card. For example, the device interface may include an external wide port, an internal wide port, and an internal narrow port. This complicates the termination of the SCSI bus because the narrow SCSI bus includes only fifty (50) conductors whereas the wide SCSI bus includes sixty-eight (68) conductors. Therefore, depending on which ports of the device interface have devices coupled to them, the device interface card may need to terminate the SCSI bus differently.
For example, if a narrow SCSI device is coupled to the internal narrow port and a wide SCSI device is coupled to the external wide port, the device interface is in the middle of the SCSI bus with respect to the narrow portion of the SCSI bus (the 50 conductors common to both a narrow SCSI bus and a wide SCSI bus); however, with respect to the wide portion of the SCSI bus (the remaining 18 conductors of a wide SCSI bus not in common with a narrow SCSI bus) the device interface is at an end of the SCSI bus. Therefore, to properly terminate the SCSI bus in the above example, the wide SCSI device would need to terminate both the wide and narrow portions of the SCSI bus, the narrow SCSI device would need to terminate the narrow portion of the SCSI bus, and the device interface would need to terminate the wide portion of the SCSI of the SCSI bus.
In the past, users were required to flip configuration switches, to install hardware jumpers, or to install terminators on the device interface when the device interface was at an end of a portion of the SCSI bus. If a user then added SCSI devices to or removed SCSI devices from the SCSI bus, then, in order to maintain proper termination of the SCSI bus, the user may need to manually re-configure the device interface by flipping switches, installing hardware jumpers, or removing terminators depending upon whether the location of the device interface with respect to the SCSI bus had changed.
It is undesirable to force a user, who may not be knowledgeable about SCSI buses and their need for termination and who may be uncomfortable with invading the main chassis, to flip configuration switches, to install jumpers, or to install terminators. What is needed therefore, is a method and apparatus for automatically determining whether SCSI devices are coupled to ports of a device interface and to either enable or disable terminators as a function of the determination.